package com.cloudkinto.service.fbaproduct;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.ProductInfoDo;
import com.cloudkinto.service.fbaproduct.vo.FbaProductAddReq;
import com.cloudkinto.service.fbaproduct.vo.FbaProductDetailRes;
import com.cloudkinto.service.fbaproduct.vo.FbaProductUpdateReq;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @author zhangyy
 * @date 2020/8/20 9:04
 * @description:
 */
public interface FbaProductService extends IService<ProductInfoDo> {

    SingleResult addInit();

    FbaProductAddReq add(FbaProductAddReq req, Long userId, Long companyId);

    SingleResult updateInit(Long id);

    FbaProductUpdateReq update(FbaProductUpdateReq updateVo, Long userId, Long companyId);

    int delete(Long id, Long userId);

    void deleteBatch(List<Long> ids , Long userId);

    FbaProductDetailRes detail(Long id);

    SingleResult pageInit();

    SingleResult productType();

    PageResult getListPage(Map<String, String> map);

    SingleResult importProductFile(MultipartFile file, Long userId, Long companyId,List<CustomizedColumnVO> customizedColumn) throws Exception;

    void exportExcel(HttpServletResponse response) throws IOException;

    String exportProductCodePdf(Long id, int count, HttpServletResponse response);

    List<String> getTitles(MultipartFile file) throws Exception;
}
